package ntd.util.frame.msg.bo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

@Data
@Schema(description = "消息主体")
@AllArgsConstructor
@NoArgsConstructor
public class MsgInfo {
    @Schema(description = "消息标题")
    private String title;
    @Schema(description = "消息链接")
    private String link;
    @Schema(description = "消息内容")
    private String content;
    @Schema(description = "扩展字段")
    Map<String, String> extras = new HashMap<>();
    public static MsgInfo init(String content) {
        return new MsgInfo(null, null, content, new HashMap<>());
    }
}